42a4a992f916708dddaa768d213cf0aa15937554,name.abuchen.portfolio.ui/src/name/abuchen/portfolio/ui/views/AccountListView.java,AccountListView,addNewAccountButton,#ToolBar#,132
Before Change
private void addNewAccountButton(ToolBar toolBar)
{
Action action = new Action()
{
@Override
public void run()
{
Account account = new Account();
account.setName(Messages.LabelNoName);
account.setCurrencyCode(getClient().getBaseCurrency());
getClient().addAccount(account);
markDirty();
resetInput();
accounts.editElement(account, 0);
}
};
action.setImageDescriptor(Images.PLUS.descriptor());
action.setToolTipText(Messages.AccountMenuAdd);
new ActionContributionItem(action).fill(toolBar, -1);
}
private void addFilterButton(ToolBar toolBar)
After Change
accounts.editElement(account, 0);
};
AbstractDropDown.create(toolBar, Messages.MenuCreateAccountOrTransaction, Images.PLUS.image(), SWT.NONE,
(dd, manager) -> {
manager.add(new SimpleAction(Messages.AccountMenuAdd, newAccountAction));
manager.add(new Separator());
Account account = (Account) accounts.getStructuredSelection().getFirstElement();
new AccountContextMenu(AccountListView.this).menuAboutToShow(manager, account, null);
});
}